1. Field of the Invention
The present invention relates to a packet accounting machine for flexible accounting according to the quality of service and a situation of the use of an application and others in a connectionless network such as the Internet.
2. Description of the Related Art
In a communication network in which accounting is executed, normally, connection is made beforehand and afterward, communication is started. Such a communication method is called connection oriented communication. In the connection oriented communication, as a parameter related to accounting is determined during a procedure for setting connection when connection is set, accounting has only to be executed according to the parameter.
In the meantime, in an internet protocol used in the Internet, the address information of a destination to which a packet called a source address is to be sent is set in a packet and a communication network automatically transmits the packet to the destination according to the source address. In this case, as connection is not set beforehand, such communication is called connectionless communication. Therefore, in connectionless communication, one block of continuous data which is a concept different from connection, that is, plural packets are required to be identified. There is a concept called flow as one of concepts. Flow is a characteristic word in connectionless communication and denotes a set of plural packets since a user application starts communication until it terminates communication.
In connection oriented communication, a group of packets sent while connection is set, that is, from the setting of connection till disconnection can be treated as one block and can be treated as the object of accounting.
In the meantime, as connectionless communication has no concept of connection and has no procedure of the setting of connection and disconnection, flow is required to be defined by some means. Normally, flow is composed of a set of a source address and a destination address or an identifier showing an application which communicates in addition to the above set. For an identifier showing an application, a port number in TCP/UDP and a combination of a port number and a contents type acquired as a result of analyzing a packet can be given.
The Internet which has developed rapidly recently has been originally used for an experiment and science. However, currently, the Internet is provided for commerce, however, it has no means to suitably account according to a situation of use.
For the current accounting method, there are roughly two systems of an accounting system according to quantity and an accounting system of fixed quantity. The accounting system according to quantity adopts a method of accounting according to connected time, for example per minute. In the accounting system of fixed quantity, communication can be freely made in a range of defined time at the same charge. For example, a charge per month is determined. There is also a combination of the accounting system according to quantity and the accounting system of fixed quantity, however, it will be described in detail at another chance. In any case, it cannot be said that the quality of communication is sufficiently counterbalanced with a charge. In original connectionless communication, a charge should be paid for the quantity of data in communication and the quality of communication, however, it is present condition that no system for accounting exists in a network.
To meet such a request, a packet accounting method according to a send address and a protocol type is proposed as disclosed in Japanese published unexamined patent application No. Hei 6-104922 for example. In a method disclosed on the above patent application, an address detector acquires only a send address and a protocol type detector detects only a protocol type. A send address is an accounted object and a protocol type is used only for determination of whether accounting is to be executed or not. Therefore, there is a problem that only accounting for an originator of data is enabled and accounting for a receiver is disabled. Further, there is also a problem that only accounting according to the quantity of data is enabled and an element such as the quality of communication cannot be adopted in accounting.
The main object of the present invention is to provide a packet accounting machine not only for conventional type accounting for an originator and uniform accounting according to quantity but for accounting not only for an originator but for receiver and flexible accounting according to the quality of service and a situation of the use of an application and others in a connectionless network such as the Internet.
A packet accounting machine according to the present invention is provided with a packet detector, a flow processing unit, a flow counter, a flow counter control unit, an accounting calculator and an accounting recorder.
The packet detector detects a packet transmitted via a packet transmission line, reads a header and a data division from the packet, acquires a source address, a destination address, an application identifier (type) and the number of bytes included in the packet or the number of packets and transfers them to the flow processing unit. The flow processing unit acquires a flow identifier uniquely given based upon a combination of a source address, a destination address and an application identifier, a sending accounting coefficient and a receiving accounting coefficient for determining accounting for a sender and a receiver based upon a source address, a destination address and an application identifier in transmitted information using a database which the flow processing unit has inside, and transfers the acquired flow identifier, sending accounting coefficient and receiving accounting coefficient to the flow counter control unit. The flow counter control unit instructs the flow counter to store the accounting coefficient according to the flows identifier.
Once flow is detected by the above operation, the flow processing unit transfers a flow identifier and the number of bytes included in a packet or only the number of packets to the counter control unit according to the information of a source address, a destination address and an application identifier respectively sent from the packet detector. The number of bytes included in a packet is acquired as a result of counting the number of bytes included in a packet received by the flow processing unit. The counter control unit instructs the flow counter specified in the flow identifier to store the number of bytes included in a packet or the number of packets at a desired address.
If the packet detector detects that a packet which belongs to flow does not arrive for fixed time or detects a signal informing that the flow of FIN signal and others in TCP is finished, the flow processing unit sends a flow termination signal and its flow identifier to the accounting calculator. The accounting calculator reads the value of a counter and an accounting coefficient from an address identified owing to the flow identifier of the flow counter, calculates accounting information based upon the above and sends it to the accounting storage. The accounting storage stores this information every user.
As described above, in the present invention, as accounting is executed every flow, not only accounting for an originator of uniformly accounting for an originator heretofore and accounting based upon only time in which a communication line is held and the number of packets but accounting for a sender, accounting for a receiver, accounting for both, accounting depending upon an application type and others are enabled in various combinations.